<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\captcha\Captcha;

$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
$this->registerCssFile('static/h-ui.admin/css/H-ui.login.css',['depends' =>['backend\assets\AppAsset'] ]);
?>
<input type="hidden" id="TenantId" name="TenantId" value="" />
<div class="header"></div>
<div class="loginWraper">
    <div id="loginform" class="loginBox">
        <?php $form = ActiveForm::begin([
            'fieldConfig' => [
                'template' => "<div class='row cl'>{label}<div class='formControls col-xs-8'>{input}</div></div>",
                'labelOptions' => [
                    'class' => 'form-label col-xs-3',
                ],

            ],
            'options' =>[
                'class' => 'form form-horizontal',
            ],

        ]); ?>

        <?= $form->field($model, 'username',['options'=>['class' => ''], 'labelOptions' => ['label' => '<i class="Hui-iconfont">&#xe60d;</i>']])->textInput(['autofocus' => true, 'class' => 'input-text size-L']);?>
        <?= $form->field($model, 'password',['options'=>['class' => ''], 'labelOptions' => ['label' => '<i class="Hui-iconfont">&#xe60e;</i>']])->passwordInput(['autofocus' => true, 'class' => 'input-text size-L']);?>
        <?= $form->field($model, 'captcha',['options'=>['class' => ''], 'template' => '<div class="row cl"><div class="formControls col-xs-8 col-xs-offset-3">
           {input}{error}{hint}</div></div>'])->widget(Captcha::classname(), [
                   //'captchaAction' => 'site/captcha',
            'template' => '{input}{image}',
            'options' => [
                "class"=>"input-text size-L",
                'style' => "width:150px;",
                'placeholder' => '验证码',
            ],
            'imageOptions' => [
                    'class' => '',
                    'alt' => '点击刷新',
                    'title' => '点击刷新',
                    "style" => "cursor:pointer;right:0px"
            ]
        ]); ?>

        <div class="row cl">
            <div class="formControls col-xs-8 col-xs-offset-3">
                <?= $form->field($model, 'rememberMe',['options'=>['class' => 'online'], 'labelOptions' => ['label' => '记住我']])->checkbox(); ?>
            </div>
        </div>

        <div class="row cl">
            <div class="formControls col-xs-8 col-xs-offset-3">
                <?= Html::submitButton('&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;', ['class' => 'btn btn-success radius size-L', 'name' => 'login-button']) ?>
                <?= Html::resetButton('&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;', ['class' => 'btn btn-default radius size-L', 'name' => 'reset-button']) ?>
            </div>
        </div>
        <?php ActiveForm::end(); ?>
    </div>
</div>
<div class="footer">Copyright 你的公司名称 by H-ui.admin v3.1</div>

